package org.crazyit.album.dao.impl;

import java.util.*;

import org.crazyit.album.domain.*;
import org.crazyit.album.dao.*;
import org.crazyit.album.service.BaseDaoHibernate4;

public class PhotoDaoHibernate extends BaseDaoHibernate4<Photo>
        implements PhotoDao {

    public List<Photo> findByUser(User user, int pageNo) {

        return findByPage("select b from Photo b where "
                + "b.user = ?0", pageNo, PAGE_SIZE, user);
    }
}